package itdep.common.services;

import itdep.common.domain.Entity;
import itdep.common.domain.EntityFilter;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

/**
 * @author Ivan Khalopik
 * @version $Revision: 4 $ $Date: 2010-06-10 13:13:16 +0000 (Thu, 10 Jun 2010) $
 */
@Service
public interface EntityService<PK extends Serializable, E extends Entity<PK>, F extends EntityFilter<PK>> {

	E get(final PK pk);

	int getEntitiesCount();

	int getEntitiesCount(final F filter);

	List<E> getEntities(final Pagination pagination);

	List<E> getEntities(final F filter, final Pagination pagination);

	E getUnique(final F filter);

	F createDefaultFilter();

}
